<?php

/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of NewsController
 *
 * @author Константин Охотник
 */

namespace Jacov\JacovBundle\Controller;

use Jacov\JacovBundle\Controller\MainController;
use Jacov\JacovBundle\Entity\Pages;
use Jacov\JacovBundle\Model\MenuModel;

class MenuController extends MainController
{  
    private $_MenuModel;
    public function indexAction()
    {
        $this->_MenuModel = new MenuModel($this->getDoctrine()->getManager());
        return $this->render(
            'JacovJacovBundle:Menu:menu.html.twig',
            array('menu'=>$this->_MenuModel->getAllPages())    
        );
    }
}

